package com.quartz.service.impl;

import com.quartz.service.BaseJob;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;

/**
 * @description:
 * @author: zyj
 * @create: 2020-01-02 11:10
 **/
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class NewJob implements BaseJob {

    private static Logger log = LoggerFactory.getLogger(NewJob.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDataMap jdMap = jobExecutionContext.getJobDetail().getJobDataMap();
        log.info("NewJob Job执行时间:"+new Date()+"；；；参数:"+jdMap.getString("invokeParam"));
    }
}
